﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;

namespace DAO
{
    public class DatabaseInfo
    {
        private string provider;


        public string Provider
        {
            get { return provider; }
        
        }

        private string dataSource;


        public string DataSource
        {
            get { return dataSource; }
        
        }

        public DatabaseInfo(string strFileSetting)
        {
            try
            {
                using (StreamReader reader = new StreamReader(strFileSetting))
                {
                    provider = reader.ReadLine().Trim();
                    dataSource = reader.ReadLine().Trim();
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }

        public DatabaseInfo() : this("../../Setting.dat")
        {
        }
    }
}
